/**
 * @file   Url.hpp
 * @author Yuan Liu <liuyuan@net.pku.edu.cn>
 * @date   Thu Sep 27 16:31:37 2007
 * 
 * @brief Parse url into elements 
 * 
 * 
 */

#ifndef __URL_HPP
#define __URL_HPP

#include <string>

const int DEFAULT_HTTP_PORT = 80;

class Url
{
public:
    Url();
    bool ParseUrl(const std::string& crUrlKey);

private:
    bool ParseScheme();
    bool ParseHost();

public:
    std::string mOrginUrl;
    std::string mHost;
    std::string mPath;
    std::string mIP;
    int         mPort;
};
#endif
